Skip to content

Agent-neutral guidance, and a single root resolver for paths - #13

Merged
Marius1311 merged 3 commits into
mainfrom
chore/agent-neutral-docs-and-paths
Aug 22, 2026
Merged

Agent-neutral guidance, and a single root resolver for paths#13
Marius1311 merged 3 commits into
mainfrom
chore/agent-neutral-docs-and-paths

Conversation

@Marius1311

Copy link
Copy Markdown
Member

Housekeeping only. The analysis-task conventions that #12 proposed are not here — those
need to be tried in a real analysis repo before they are baked into the template.

Agent-neutral guidance. Repo guidance lived only in .github/copilot-instructions.md,
which names one agent. AGENTS.md is now the canonical file; CLAUDE.md and the copilot
instructions are pointers to it. Content is what was already there — layout, paths,
environments, commands — plus a short paths section.

One root resolver. _find_root walked up for pixi.toml/.git, which stops at a git
worktree (a worktree's .git is a file, but it exists). Data would then resolve into the
worktree instead of the checkout everyone shares. The root now comes from
git rev-parse --git-common-dir, which names the main checkout from anywhere, with the
marker walk kept as the fallback for a non-git install.

Dataset paths as a set. DatasetPaths was properties + a hand-written create() loop;
it is now a field dataclass over a small _Dirs base that supplies create(), built by
expanding DATASET_DIRS — so a subfolder name is written once. EXAMPLE_DATASET is dropped
in favour of FilePaths.dataset("example_dataset"), so there is one way to reach a dataset.

_Dirs is deliberately the extension point: a future task-path type is the same shape with
different roots, once we know from practice that the shape is right.

Tests pass; the demo notebook is updated.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VYsKhgGuNCFtxqFhSLGtCK

Guidance lived only in .github/copilot-instructions.md, which named one agent. AGENTS.md is
now the canonical file, with CLAUDE.md and the copilot instructions as pointers to it.

_find_root walked up for a marker file, which stops at a git worktree — so data would resolve
into the worktree rather than the checkout everyone shares. The root is now resolved from git
(--git-common-dir names the main checkout from anywhere), with the marker walk as the fallback
for a non-git install.

DatasetPaths becomes a plain field dataclass over a small base that supplies create(), built by
expanding DATASET_DIRS, so a subfolder name is written once. EXAMPLE_DATASET is dropped:
FilePaths.dataset() is the single way to reach a dataset.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VYsKhgGuNCFtxqFhSLGtCK
Marius1311 and others added 2 commits August 22, 2026 16:37
Datasets were reached by a method call returning a dataclass while figures were a plain
attribute, so the two looked nothing alike. The one repo that has used this layout for years
(gli3_merscope_analysis) reaches every dataset as a flat constant and treats
{raw,processed,resources,results} as a documented convention, which has held up fine.

FilePaths is now attributes only, all of them Paths. DatasetPaths and the shared _Dirs base
are gone; the layout convention is stated in AGENTS.md instead.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VYsKhgGuNCFtxqFhSLGtCK
It still called the dataset() accessor removed in the previous commit.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VYsKhgGuNCFtxqFhSLGtCK
@Marius1311
Marius1311 merged commit 0fbfdcb into main Aug 22, 2026
2 checks passed
@Marius1311
Marius1311 deleted the chore/agent-neutral-docs-and-paths branch August 22, 2026 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant